package org.wii.base.context;

import java.util.Map;

/**
 * @author tanghong on 2022/12/23
 */
public class HttpContextHolder {
    private static final InheritableThreadLocal<Map<String, String>> HTTP_HEADERS = new InheritableThreadLocal<>();

    public static void setHttpHeaders(Map<String, String> headers) {
        HTTP_HEADERS.set(headers);
    }

    public static Map<String, String> getHttpHeaders() {
        return HTTP_HEADERS.get();
    }

    public static void removeHttpHeaders() {
        HTTP_HEADERS.remove();
    }
}
